package cn.enjoy.design.structure.zuhe.engine.impl;

import cn.enjoy.design.structure.zuhe.engine.EngineBase;
import cn.enjoy.design.structure.zuhe.entity.EngineResult;
import cn.enjoy.design.structure.zuhe.entity.Node;

import java.util.Map;

/**
 * @author Administrator
 */
public class TreeEngineHandle extends EngineBase {

    @Override
    public EngineResult process(Node nodeRoot, Map<String, String> decisionMatter) {
        // 决策流程
        Node node = decisionMaker(nodeRoot, decisionMatter);
        // 决策结果
        return new EngineResult(node.getNodeId(), node.getNodeValue());
    }

}
